﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace AppUnioeste
{
	[Activity (Label = "InfoCal")]			
	public class InfoCal : Activity
	{
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.InfoCal);
			// Create your application here
			bool flag = false;
			var label = FindViewById<TextView> (Resource.Id.textView1);
			//tem que verificar como que funciona para pegar de qualquer dado
			label.Text = Intent.GetStringExtra("FirstData") ?? "Data not available";
			var estrela = FindViewById<LinearLayout> (Resource.Id.estrela);
			var calendario = FindViewById<LinearLayout> (Resource.Id.calendario);
			estrela.Click += (sender, e) =>{
				if(!flag){
					estrela.SetBackgroundDrawable (Resources.GetDrawable(Resource.Drawable.star));
					flag = true;
					//seta essa programação como favorita

				}else{
					estrela.SetBackgroundDrawable (Resources.GetDrawable(Resource.Drawable.star_silver));
					flag = false;
					//remove essa programação dos favoritos

				}
					
			};

			calendario.Click += (sender, e) =>{
				Toast.MakeText (this, string.Format ("FUNCAO A SER IMPLEMENTADA PELO THALES"), 
						ToastLength.Long).Show ();
			};


		}
	}
}

